﻿using System.Linq;
using WebExam.DataEntities;

namespace WebExam.DataProvider
{
    public interface ICJRepository
    {
        /// <summary>
        /// 根据学号获取学生成绩
        /// </summary>
        /// <param name="xsId">学号</param>
        /// <param name="start">开始位置</param>
        /// <param name="takeSize">获取条数</param>
        IQueryable<CJ> GetAll(string xsId, int start, int takeSize);

        /// <summary>
        /// 根据成绩单Id获取学生成绩
        /// </summary>
        /// <param name="cjdId">成绩单Id</param>
        CJ Get(int cjdId);

        /// <summary>
        /// 添加学生成绩
        /// </summary>
        /// <param name="cj">成绩对象</param>
        CJ Add(CJ cj);

        /// <summary>
        /// 根据学号统计成绩条数
        /// </summary>
        /// <param name="xsId">学号</param>
        int Count(string xsId);
    }
}